x86/pv: handle writes to the EFER MSR
authorRoger Pau Monne <roger.pau@citrix.com>
Mon, 17 Aug 2020 15:57:52 +0000 (17:57 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 18 Aug 2020 16:34:50 +0000 (17:34 +0100)
commitfeab5bddf771f04ec5e5fbe4c704db740e8401ab
treea4923c4fe17441542c6199083a4fd9b58df6b0a9
parent80a868f0f6ccffee5843cbf1ad880ffcb76267a2
x86/pv: handle writes to the EFER MSR

Silently drop writes to the EFER MSR for PV guests if the value is not
changed from what it's being reported. Current PV Linux will attempt
to write to the MSR with the same value that's been read, and raising
a fault will result in a guest crash.

As part of this work introduce a helper to easily get the EFER value
reported to guests.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/pv/emul-priv-op.c